Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crc-32

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crc-32

Pure-JS CRC-32

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11M
increased by0.92%
Maintainers
1
Weekly downloads
 
Created

What is crc-32?

The crc-32 npm package is a JavaScript library for calculating CRC32 checksums. CRC32 is a checksum algorithm that generates a 32-bit hash of data, which can be used to verify the integrity of data during transmission or storage. This package provides functions to compute CRC32 checksums for strings and byte arrays.

What are crc-32's main functionalities?

CRC32 checksum from a string

This feature allows you to compute the CRC32 checksum of a given string. The 'crc32.str' function takes a string as input and returns the checksum as a signed 32-bit integer.

"use strict";
var crc32 = require('crc-32');
var str = 'Hello World';
var checksum = crc32.str(str);
console.log('Checksum for string:', checksum);

CRC32 checksum from a byte array

This feature allows you to compute the CRC32 checksum of a byte array. The 'crc32.buf' function takes a byte array (Uint8Array) as input and returns the checksum as a signed 32-bit integer.

"use strict";
var crc32 = require('crc-32');
var buf = new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]);
var checksum = crc32.buf(buf);
console.log('Checksum for byte array:', checksum);

Other packages similar to crc-32

Keywords

FAQs

Package last updated on 08 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc